import React, { Fragment } from 'react'
import { changeRouter } from '../../js/action/index'
import { connect } from 'react-redux'
import Form from './form'
import List from './list'

const mapDispatchToProps = dispatch => ({
  changeRouter: key => dispatch(changeRouter(key))
})
function reduxPages({changeRouter }) {
  changeRouter('1')
  return (
    <Fragment>
      <List />
      <Form />
    </Fragment>
  )
}

export default connect(null, mapDispatchToProps)(reduxPages)